package com.zdkj.subway.st.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.zdkj.common.core.exceltools.HeaderToColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @ProjectName: zdkj
 * @Package: com.zdkj.subway.st.entity
 * @ClassName: SwStStockDayCheckDetail
 * @Description:
 * @Author: kangjian
 * @CreateDate: 2020/1/10 17:27
 * @Version: 1.0
 */

@Data
@TableName("sw_tk_stock_day_check_detail")
@ApiModel(value = "车票库存日盘点记录")
@EqualsAndHashCode(callSuper = true)
public class SwStStockDayCheckDetail extends Model<SwStStockDayCheckDetail> {
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "唯一标识")
    private Integer id;

    @ApiModelProperty(value = "票种")
    @HeaderToColumn(header = "票种",index = 1,colhandlebysql = "SELECT LABEL FROM SYS_DICT_ITEM WHERE DICT_ID=(SELECT ID FROM SYS_DICT WHERE TYPE='SUPPORT_TICKET_TYPE') AND VALUE=?")
    private String ticketType;

    @HeaderToColumn(header = "车票名称",index = 2)
    @ApiModelProperty(value = "车票名称")
    private String ticketName;

    @ApiModelProperty(value = "库区")
    @HeaderToColumn(header = "库区",index = 3)
    private String stockArea;

    @ApiModelProperty(value = "出入库类型")
    @HeaderToColumn(header = "出入库类型",index = 4)
    private String storageType;

    @ApiModelProperty(value = "出入库方式")
    @HeaderToColumn(header = "出入库方式",index = 5)
    private String outInGoingType;

    @ApiModelProperty(value = "出入库时间")
    @HeaderToColumn(header = "出入库时间",index = 6)
    private LocalDateTime outInGoingTime;

    @ApiModelProperty(value = "车票有效期")
    @HeaderToColumn(header = "车票有效期",index = 7)
    private String activeTime;

    @ApiModelProperty(value = "车票最晚启动日期")
    @HeaderToColumn(header = "车票最晚启动日期",index = 8)
    private LocalDateTime latestStartTime;

    @ApiModelProperty(value = "库管员1工号")
    @HeaderToColumn(header = "库管员1工号",index = 9)
    private String keeper1code;

    @ApiModelProperty(value = "库管员1")
    @HeaderToColumn(header = "库管员1",index = 10)
    private String keeper1name;

    @ApiModelProperty(value = "库管员2工号")
    @HeaderToColumn(header = "库管员2工号",index = 11)
    private String keeper2code;

    @ApiModelProperty(value = "库管员2")
    @HeaderToColumn(header = "库管员2",index = 12)
    private String keeper2name;

    @ApiModelProperty(value = "起止号")
    @HeaderToColumn(header = "起止号",index = 13)
    private String ticketNo;

    @ApiModelProperty(value = "车票次数")
    @HeaderToColumn(header = "车票次数",index = 14)
    private Integer ticketTimes;

    @ApiModelProperty(value="车票金额")
    @HeaderToColumn(header = "车票金额",index = 15)
    private BigDecimal ticketPrice;

    @ApiModelProperty(value = "数量")
    @HeaderToColumn(header = "数量",index = 16)
    private Integer storageNumber;

    @ApiModelProperty(value = "结存数量")
    @HeaderToColumn(header = "结存数量",index = 17)
    private Integer settleNumber;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "出库/入库单ID")
    private Integer outputOrInputStockid;

    @ApiModelProperty(value = "出库/入库单编号")
    private String outputOrInputStockno;

    @ApiModelProperty(value = "创建人ID")
    private Integer creatorId;

    @ApiModelProperty(value = "创建人名称")
    private String creatorName;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 用于前端传开始结束日期
     */
    @TableField(exist = false)
    @ExcelIgnore
    private List<String> dates1;
}
